package model;

import java.util.LinkedList;
import java.util.List;

public class Rule {
	private NonTerminal ruleName;
	private List<ProductionLine> productionLines;
	
	public Rule(NonTerminal ruleName) {
		this.ruleName = ruleName;
		productionLines = new LinkedList<ProductionLine>();
	}
	
	public NonTerminal getRuleName() {
		return ruleName;
	}
	
	public void newProductionLine() {
		productionLines.add(new ProductionLine());
	}
	
	public List<ProductionLine> getProductionLines() {
		return productionLines;
	}
	
	public ProductionLine getLastProductionLine() {
		return productionLines.get(productionLines.size() - 1);
	}
}
